.am-container {
  height: 100%;
}

.am-button {
  position: relative;
}

.am-button .am-monitor__indicator-mobile {
  display: none;
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  border-radius: 50%;
  width: 0.65rem;
  height: 0.65rem;
  background-color: #ff9800;
}
.security-am .am-monitor__indicator-mobile {
  background-color: #dc3545;
}

.am-button .am-monitor__count {
  display: inline-block;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 20px;
  min-width: 20px;

  color: #fff;
  background-color: #ff9800;
  font-weight: bold;

  border-radius: 4px;
}
.am-button.security-am .am-monitor__count {
  color: #fff;
  background-color: #dc3545;
}
.am-container div.am-list {
  position: absolute;
  top: 48px;
  right: 2%;
  height: auto;
  z-index: 0;
  padding: 2em;
  text-align: left;
  display: block;
  background-color: #fff;
  background-color: var(--background);
  border-radius: 5px;

  /* Darken the box shadow to make the popup visible over the search box  */
  box-shadow: 0 1px 7px 0 rgba(0, 0, 0, 0.3);

  transition: all 0.15s cubic-bezier(0.84, 0.03, 0.21, 0.96);
  opacity: 0;
  transform: scale(0);
}
.am-container.visible div.am-list {
  opacity: 1;
  transform: scale(1);
  z-index: 1000;
}
.am-container.visible .am-button {
  background-color: #404040;
  background-color: var(--header-link-bg-classic-active);
  text-decoration: none;
}
.am-container .am-button:after {
  content: "";
  display: inline-block;
  position: absolute;
  bottom: 0;
  left: 32%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
  opacity: 0;
  transition-property: all;
  transition-delay: 0s;
  z-index: 1001;
}
.am-container.visible .am-button:after {
  opacity: 1;
  transition-property: all;
  transition-delay: 0.15s;
}
.am-container .am-message {
  display: block;
  line-height: 1.4em;
  margin-bottom: 1.4em;
}

.am-message-list {
  padding: 0;
}

.am-container .am-message .alert form {
  position: relative;
  float: right;
  margin: -6px 0 0 0 !important;
  gap: 0.5rem;
  display: flex;
  padding-left: 0.5rem;
}

.am-container .am-message .alert form span {
  margin: 0 0 0 4px !important;
}

.am-container .am-message .alert {
  margin-bottom: 0 !important;
}

.am-container .am-message dl dt::after {
  content: ": ";
}

/* Restore hyperlink style overriden by the page header */
.am-container .am-list a:link {
  display: inline-block;
  color: #204a87;
  color: var(--link-color);
  text-decoration: underline;
  margin-right: 0;
  padding: 0;
  font-weight: 600;
  font-weight: var(--link-font-weight);
}
.am-container .am-list a:visited {
  color: #5c3566;
  color: var(--link-color);
}
.am-container .am-list a:hover,
.am-container .am-list a:focus,
.am-container .am-list a:active {
  color: #5c3566;
  color: var(--link-color);
  background-color: transparent;
  text-decoration: underline;
  text-decoration: var(--link-text-decoration--hover);
}

.am-container .am-list .alert-success a {
  color: #155724;
  color: var(--alert-success-text-color);
}

.am-container .am-list .alert-info a {
  color: #31708f;
  color: var(--alert-info-text-color);
}

.am-container .am-list .alert-warning a {
  color: #8a6d3b;
  color: var(--alert-warning-text-color);
}

.am-container .am-list .alert-danger a {
  color: #a94442;
  color: var(--alert-danger-text-color);
}

@media screen and (max-width: 576px) {
  /* Hide non-security monitors on mobile view to avoid messing up the heading */
  #visible-am-container {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .am-button .am-monitor__indicator-mobile {
    display: block;
  }
  .am-button .am-monitor__count {
    display: none;
  }
}
